﻿using Orchard.ContentManagement;


namespace Hazza.UserInput.Models
{
    public class TextInputPart : ContentPart
    {
        public string Type
        {
            get { return this.Retrieve(x => x.Type); }
            set { this.Store(x => x.Type, value); }
        }

        public bool Required {
            get { return this.Retrieve(x => x.Required); }
            set { this.Store(x => x.Required, value); } 
        }

        public string Placeholder
        {
            get { return this.Retrieve(x => x.Placeholder); }
            set { this.Store(x => x.Placeholder, value); }
        }

        public bool AutoFocus
        {
            get { return this.Retrieve(x => x.AutoFocus); }
            set { this.Store(x => x.AutoFocus, value); }
        }

        public int MaxLength
        {
            get { return this.Retrieve(x => x.MaxLength, 500); }
            set { this.Store(x => x.MaxLength, value); }
        }

        public string CorrectAnswer
        {
            get { return this.Retrieve(x => x.CorrectAnswer); }
            set { this.Store(x => x.CorrectAnswer, value); }
        }
    }
}